package com.zsrt.oa.vip.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import com.zsrt.oa.vip.dao.VipDao;
import com.zsrt.oa.vip.dao.impl.VipDaoImpl;
import com.zsrt.oa.vip.entity.VipEntity;
import com.zsrt.oa.vip.service.VipService;

/**
 * 查询所有会员信息
 * @param map
 */
public class VipServiceImpl implements VipService {
	
	/**
	 * 初始化持久层
	 */
	private VipDao dao = new VipDaoImpl();
	
	/**
	 * 查找全部会员
	 * @return
	 */
	@Override
	public void queryAllMessage(Map<String, Object> map) {
		try {
			List<VipEntity> list = dao.queryAllMessage();
			System.out.println(list);
			map.put("result", "success");
			map.put("message", "查询成功..");
			map.put("data", list);
		} catch (SQLException e) {
			map.put("result", "error");
			map.put("message", "程序员正在努力抢修中,请稍后再试....");
			e.printStackTrace();
		}
	}
}
